package com.maduar.mybatis.demo.vo;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Description:
 *
 * @author maduar maduar@163.com
 * @date 2021-04-11 00:29
 */
@Data
public class PageResultRet<T> implements Serializable {
    private static final long serialVersionUID = 6333064160123733199L;

    private Long total;
    private Long pages;
    private Long size;
    private List<T> list;

    public static <T> PageResultRet<T> getInstance() {
        PageResultRet<T> res = new PageResultRet<T>();
        res.setTotal(0L);
        res.setPages(0L);
        res.setList(new ArrayList<>());
        return res;
    }
}
